package com.train.entity;



public class Wagon extends ParentBase<Passenger> implements Comparable<Wagon> {

	private int comfort;
	private int maxPassengers;
	
	public Wagon(int id, int comfort, int maxPassengers){
		this.id = id;
		this.comfort = comfort;
		this.maxPassengers = maxPassengers;
	}
		
	public int getComfort() {
		return comfort;
	}
	public void setComfort(int comfort) {
		this.comfort = comfort;
	}
	public int getMaxPassengers() {
		return maxPassengers;
	}
	public void setMaxPassengers(int maxPassengers) {
		this.maxPassengers = maxPassengers;
	}

	@Override
	public int compareTo(Wagon arg) {
		return new Integer(this.comfort).compareTo(arg.getComfort());
	}
	
}
